package com.linln.modules.rate.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.linln.modules.rate.domain.Rate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;


/**
 * @author : pengliang
 * @version V1.0
 * @Project: timo
 * @Package com.linln.modules.rate.mapper
 * @Descriptio /**
 * @Project: timo
 * @Package com.linln.modules.rate.mapper
 * @Description: TODO
 * @date Date : 2021年01月05日 14:10
 */
@Mapper
@Component
public interface RateMapper extends BaseMapper<Rate> {
    //获取评论记录
    List<Rate> selectRateList(@Param("shopName") String shopName, @Param("status") Integer status);
    //获取店铺评论
    List<Rate> selectRateListByShopId(@Param("shopId") String shopId);
    //获取评论数量 和 评论总分数
    Map<String, Object> selectCountScoreByShopId(@Param("shopId") String shopId);
    //批量更新
    int batchUpdateRateStatus(@Param("rateIds") List<String> rateIds, @Param("status") Integer status);
}
